﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public interface IGAssetLoader
{
    void Init();

    /// <summary>
    /// 同步加载资源
    /// </summary>
    /// <typeparam name="T"></typeparam>
    /// <param name="path"></param>
    /// <returns></returns>
    T GetRes<T>(string path) where T : Object;

    Object GetRes(string path);

    /// <summary>
    /// 异步加载资源----回调方式
    /// </summary>
    /// <typeparam name="T"></typeparam>
    /// <param name="path"></param>
    /// <returns></returns>
    void GetResAsync<T>(string path, System.Action<string, T> callback) where T : Object;

    void GetResAsync(string path, System.Action<string, Object> callback);

    /// <summary>
    /// 卸载指定的资源
    /// </summary>
    /// <param name="path"></param>
    /// <param name="unloadImmediately"></param>
    void UnLoad(string path, bool unloadImmediately = false);
}
